package com.snake.springboot.authority.service.assembler;

import com.snake.springboot.authority.api.model.AuthSystemModel;
import com.snake.springboot.authority.dao.mybatis.entity.AuthSystemDO;
import org.snake.common.code.SerialNumberGeneratorFactory;
import org.snake.common.utils.PropertyUtils;

/**
 * 类 {@code AuthSystemAssembler}  <br> .
 * <p>系统信息组装器
 * 创建时间：2024/5/27 14:29
 *
 * @author Yzhui
 * @see
 */
public class AuthSystemAssembler {

    public static AuthSystemDO assembleAuthSystemDO(AuthSystemModel model){
        AuthSystemDO entity = new AuthSystemDO();
        PropertyUtils.copyPropertiesIfNull(entity, model);
        return entity;
    }

    public static AuthSystemModel assembleAuthSystemModel(AuthSystemDO entity){
        AuthSystemModel model = new AuthSystemModel();
        PropertyUtils.copyPropertiesIfNull(model, entity);
        return model;
    }
}
